package javabasic.threads.quqian;

import java.util.PrimitiveIterator;

public class BankCount {
    private int sum=500;
    public synchronized void out(){
        if (sum>0){
            sum=sum-100;
        }else {
            System.out.println("账户没有钱");
        }
    }
    public int getSum(){
        return sum;
    }
}
